package com.okami.designpatterns.factory.simplefactory;

import com.okami.designpatterns.factory.NoProductException;
import com.okami.designpatterns.factory.Shape;

/**
 * @description: 用来调用工厂产生对象
 * @author: TanJingyu
 * @create: 2020-12-09 15:02
 **/
class ShapeStore {
    Shape getShape(String type) throws NoProductException {
        Shape shape = Factory.getInstance(type);
        // 可能进行一系列操作
        // 每个不同shape的shagnse方法都不同
//        shape.shangse.....();
        return Factory.getInstance(type);
    }
}
